package winOrDie.graphicsInterface.GameRoom;

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Label;

import winOrDie.Net.Client.WoD_Peer;

public class Composite_Peer_List_Item extends Composite {

	private Label label = null;

	private WoD_Peer clientPeer = null;
	
	
	
	public WoD_Peer getClientPeer() {
		return clientPeer;
	}

	public void setClientPeer(WoD_Peer clientPeer) {
		this.clientPeer = clientPeer;
		paintData();
	}

	public Composite_Peer_List_Item(Composite parent, int style) {
		super(parent, style);
		initialize();
	}

	private void initialize() {
		label = new Label(this, SWT.NONE);
		label.setText("Label");
		setSize(new Point(300, 42));
		setLayout(new GridLayout());
	}

	
	public void paintData()
	{
		label.setText(clientPeer.getUserName());
	}
	
	
}  //  @jve:decl-index=0:visual-constraint="10,10"
